class First {
  // void doPrint() {
  //   print('First');
  // }
}

class First2 {
  // void doPrint() {
  //   print('First2');
  // }
}

class Second {

  void doPrint() {
    print('Second');
  }
}

class Father {
  void doPrint() {
    print('Father');
  }
}

// class Son1 extends Father with First, Second {}

class Son2 extends Father with First implements Second {}

class Son3 extends Father implements Second {}

class Son4 extends Father with First,First2 implements Second {
  // @override
  // void doPrint() {
  //   print("Son4");
  // }
}

//当有同名方法时：
//无论是extends、implements还是mixin(混入，with)，优先级最高的是在具体类中的方法。
//其他优先级：with(尾) > with(首) > extends > implements
main() {
  // Son1 son1 = new Son1();
  // son1.doPrint();
  // print("---------------------");
  // Son2 son2 = new Son2();
  // son2.doPrint();
  // print("---------------------");
  // Son3 son3 = new Son3();
  // son3.doPrint();
  // print("---------------------");
  Son4 son4 = new Son4();
  son4.doPrint();
}